<?php

/**
 * Created by PhpStorm.
 * User: wenqiang.yq@gmail.com
 * Date: 16-3-1
 * Time: 下午11:03
 */
include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "core" . DIRECTORY_SEPARATOR . "EsHttp.php";
function testPut()
{
    $result = \ElasticSearch\EsHttp::put("http://127.0.0.1:9200/server_log/test_data/5", array(
        "name" => "xuwenqiang03",
        "age" => 26,
        "high" => 190,
        "p" => '1p0',
        "a" => '1a0',
        "c" => 190,
        "f" => 190,
        "v" => 190,
    ));
    print_r($result);
}

function testDelete()
{
    $result = \ElasticSearch\EsHttp::delete("http://127.0.0.1:9200/server_log/test_data/1");
    print_r($result);
}
testDelete();